<?php

use think\Route;

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

Route::group('api', function () {
    Route::get('sliceCodeInfo', 'Index/slideCode');//关于滑动验证码
    Route::get('getCode', 'Index/getCode');//短信验证码
    Route::get('configs', 'Index/getConfig');//获取所有配置信息
    Route::post("upload", "Index/uploadImg");//上传图片
    Route::post('register', 'Index/registerIndex');//注册及登录
    Route::post('login', 'Index/login');//仅登录
    Route::post('getPoolInfo', 'Index/getPoolInfo');//获取流动池初始信息
    Route::get('getAllArea', 'Index/getAllArea');//根据父id获取所有子区域
    Route::get('tf', 'Index/tf');//通兑宝兑换财富值和绿色积分,财富值兑换通兑宝
    Route::get('documentLists', 'Index/documentLists');//首页文章列表
    Route::get('detail', 'Article/one');//文章详情
    Route::get('documentDetail', 'Index/documentDetail');//文章详情
    Route::get("getFlowRate", "Index/getFlowRate");//获取财富值/增值通转赠的比例

    Route::post('storeApply', 'Store/apply');//商户入驻

    Route::get('slides', 'Shop/slides');//首页轮播图及动态
    Route::get('selectedAndFarm', 'Shop/index');//首页商品
    Route::get('getShopsByField', 'Shop/getShopsByField');//根据字段获取商品
    Route::get('searchResult', 'Shop/searchResult');//商品搜索
    Route::get('goodsdetail', 'Shop/goodsdetail');//商品详情
    Route::get('getCates', 'Shop/cates');//获取商品分类页信息

    Route::post('getUserInfo', 'User/index');//获取个人信息
    Route::post('isBonus', 'User/isBonus');//个人是否应该获取奖励
    Route::post('signInit', 'User/signInit');//签到初始信息
    Route::post('finishView', 'User/finishView');//观看视频
    Route::post('finishSign', 'User/finishSign');//完成签到
    Route::post('userAuth', 'User/authApply');//个人信息认证
    Route::post('userAuthPay', 'User/userAuthPay');//个人信息认证打款
    Route::post('finance', 'User/finance');//获取资金信息
    Route::post('getPackages', 'User/getPackages');//获取消费包
    Route::post('buyPackage', 'User/buyPackage');//购买消费包
    Route::post("headimg", "User/changeHeadimg");//更新头像
    Route::post("changeAlipay", "User/changeAlipay");//更新支付宝收款码
    Route::post("changeWechat", "User/changeWechat");//更新微信收款码
    Route::post("updateMemberMsg", "User/updateMemberMsg");//更新收款方式
    Route::post("resetPwd1", "User/resetPwd1");//重置登录密码
    Route::post("resetPwd2", "User/resetPwd2");//重置支付密码
    Route::post("changePwd1", "User/changePwd1");//更新登录密码
    Route::post("changePwd2", "User/changePwd2");//更新支付密码
    Route::post("getRate", "User/getRate");//获取活跃值兑换通兑宝的比例
    Route::post("recoms", "User/userIndex");// 推荐会员
    Route::post("updateReply", "User/updateReply");// 升级申请

    Route::post("addShopBrowser", "Shop/addShopBrowser");//添加商品浏览记录
    Route::post("shopBrowser", "shop/shopBrowser");//我的浏览商品
    Route::post("delBrowser", "shop/delBrowser");//我的浏览商品

    Route::get("isCollect", "shop/isCollect");//是否收藏商品
    Route::post("changeCollect", "shop/changeCollect");//收藏/删除商品
    Route::post("shopCollect", "shop/shopCollect");//我的收藏商品
    Route::post("delCollect", "shop/delCollect");//删除收藏

    Route::post("addCart", "shop/addCart");//添加商品进购物车
//    Route::post("delCart", "shop/delCart");//删除购物车商品
    Route::post("cartList", "shop/cartList");//我的购物车
    Route::post("clearCart", "shop/clearCart");//清空购物车
    Route::post("order", "shop/order");//去结算
    Route::post("createOrder", "shop/createOrder");//生成订单
    Route::post("getOrder", "shop/getOrder");//获取商品清单
//    Route::post("goOrder", "shop/goOrder");//再次去支付
//    Route::post("payAgain", "shop/payAgain");//去付款
//    Route::post("goPay", "shop/goPay");//支付订单


    Route::post("getAddress", "shop/getDefaultAddress");//获取默认收货地址
//    Route::post("getAddressInfo", "shop/addressInfo");//获取地址详情
    Route::post("editAddress", "shop/editAddress");//添加或编辑地址
    Route::post("getAllAddress", "shop/getAllAddress");//获取收货地址
//
    Route::post("orders", "Order/orders");//订单列表
    Route::post("delOrder", "Order/delOrder");//删除订单
//    Route::post("canOrder", "shop/cancleOrder");//取消订单
    Route::post("conOrder", "Order/confirmOrder");//确认订单

    Route::post("traders_lists", "Traders/tradersLists");//券商列表
    Route::post("trades_list", "TradersOrder/lists");//订单记录
    Route::post("trades_add", "TradersOrder/add");//添加订单记录
    Route::post("trades_detail", "TradersOrder/one");//查看订单详情
    Route::post("trades_pay", "TradersOrder/confirmPay");//确认打款
    Route::post("trades_complain", "TradersOrder/complain");//立即申诉
    Route::post("trades_finish", "TradersOrder/confirmOrder");//确认订单

    Route::post("tfReply1", "TradingHall/tfReply1");//转币记录
    Route::post("tfReply2", "TradingHall/tfReply2");//转币记录（同币种）
    Route::post("reReply", "TradingHall/reReply");//充值申请
    Route::post("wdReply", "TradingHall/wdReply");//提现申请
    Route::post("confirmTf", "TradingHall/tf");//闪兑转币
    Route::post("financialFlow", "TradingHall/financialFlow");//财务流水

    Route::post("member_groups_list", "MemberGroups/lists");//群组列表
    Route::post("new_members_list", "MemberGroups/newLists");//待添加好友列表
    Route::post("add_new_member", "MemberGroups/create");//添加好友
    Route::post("member_groups_detail", "MemberGroups/one");//群组详情
    Route::post("member_groups_chats", "MemberGroupsChat/lists");//群聊记录
});


return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]' => [
        ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];


